<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        *{
            margin: 0;
            padding: 0;
            list-style: none;
            border: none;
        }
        img{
            vertical-align: top;
        }
        #box{
            position: fixed;
            right: 0;
            bottom: 0;
        }
        #close{
            width: 25px;
            height: 25px;
            /*background: red;*/
            position: absolute;
            right: 0;
            top: 0;
        }
    </style>

</head>
<body>
<div id="box">
    <span id="close"></span>
    <div id="top">
        <img src="images/top.jpg">
    </div>
    <div id="bottom">
        <img src="images/bottom.jpg">
    </div>
</div>
<script src="js/myFunc.js"></script>
<script>
    window.onload = function () {
        var close = document.getElementById("close");
        var top = document.getElementById("top");
        var bottom = document.getElementById("bottom");
        var box = document.getElementById("box");
        close.onclick = function () {
            buffer(bottom,{"height":0},function () {
               buffer(box,{"width":0},function () {
                   close.style.display = "none";
               }) ;
            });
        }
    }
</script>
</body>
</html>